package(default_visibility=["//visibility:public"])

load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library", "sass_binary")
load("//tools:defaults.bzl", "ng_module")

ng_module(
  name = "form-field",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/material/form-field",
  assets = [
    ":form-field.css",
    ":form-field-fill.css",
    ":form-field-legacy.css",
    ":form-field-outline.css",
    ":form-field-standard.css",
    "//src/lib/input:input.css"
  ] + glob(["**/*.html"]),
  deps = [
    "@angular//packages/animations",
    "@angular//packages/common",
    "@angular//packages/core",
    "@angular//packages/forms",
    "@angular//packages/platform-browser/animations",
    "@rxjs",
    "@rxjs//operators",
    "//src/cdk/bidi",
    "//src/cdk/coercion",
    "//src/cdk/observers",
    "//src/cdk/platform",
    "//src/lib/core",
  ],
)

# TODO(jelbourn): replace this w/ sass_library when it supports acting like a filegroup
filegroup(
  name = "form_field_scss_partials",
  srcs = glob(["**/_*.scss"]),
)

sass_binary(
  name = "form_field_scss",
  src = "form-field.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_binary(
  name = "form_field_fill_scss",
  src = "form-field-fill.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_binary(
  name = "form_field_legacy_scss",
  src = "form-field-legacy.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_binary(
  name = "form_field_outline_scss",
  src = "form-field-outline.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_binary(
  name = "form_field_standard_scss",
  src = "form-field-standard.scss",
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_library(
  name = "theme",
  srcs = glob(["**/*-theme.scss"]),
)
